home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 April / Chip CMCD0400.iso / OFFLINE / sursemsa / Visual Basic / Form1.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  2000-02-17  |  6.5 KB  |  211 lines

  1. VERSION 5.00
  2. Object = "{F5BE8BC2-7DE6-11D0-91FE-00C04FD701A5}#2.0#0"; "AGENTCTL.DLL"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Microsoft Agent"
  5.    ClientHeight    =   3195
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4680
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3195
  11.    ScaleWidth      =   4680
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.Frame Frame1 
  14.       Caption         =   "Actor"
  15.       BeginProperty Font 
  16.          Name            =   "MS Sans Serif"
  17.          Size            =   8.25
  18.          Charset         =   0
  19.          Weight          =   700
  20.          Underline       =   0   'False
  21.          Italic          =   -1  'True
  22.          Strikethrough   =   0   'False
  23.       EndProperty
  24.       ForeColor       =   &H000000FF&
  25.       Height          =   1695
  26.       Left            =   480
  27.       TabIndex        =   3
  28.       Top             =   840
  29.       Width           =   1575
  30.       Begin VB.OptionButton optPapagal 
  31.          Caption         =   "Papagal"
  32.          BeginProperty Font 
  33.             Name            =   "MS Sans Serif"
  34.             Size            =   8.25
  35.             Charset         =   0
  36.             Weight          =   700
  37.             Underline       =   0   'False
  38.             Italic          =   -1  'True
  39.             Strikethrough   =   0   'False
  40.          EndProperty
  41.          ForeColor       =   &H00FF0000&
  42.          Height          =   375
  43.          Left            =   120
  44.          TabIndex        =   6
  45.          Top             =   1200
  46.          Width           =   1215
  47.       End
  48.       Begin VB.OptionButton optVrajitor 
  49.          Caption         =   "Vrajitor"
  50.          BeginProperty Font 
  51.             Name            =   "MS Sans Serif"
  52.             Size            =   8.25
  53.             Charset         =   0
  54.             Weight          =   700
  55.             Underline       =   0   'False
  56.             Italic          =   -1  'True
  57.             Strikethrough   =   0   'False
  58.          EndProperty
  59.          ForeColor       =   &H00FF0000&
  60.          Height          =   375
  61.          Left            =   120
  62.          TabIndex        =   5
  63.          Top             =   720
  64.          Width           =   1095
  65.       End
  66.       Begin VB.OptionButton optGeniu 
  67.          Caption         =   "Geniu"
  68.          BeginProperty Font 
  69.             Name            =   "MS Sans Serif"
  70.             Size            =   8.25
  71.             Charset         =   0
  72.             Weight          =   700
  73.             Underline       =   0   'False
  74.             Italic          =   -1  'True
  75.             Strikethrough   =   0   'False
  76.          EndProperty
  77.          ForeColor       =   &H00FF0000&
  78.          Height          =   375
  79.          Left            =   120
  80.          TabIndex        =   4
  81.          Top             =   240
  82.          Width           =   1215
  83.       End
  84.    End
  85.    Begin VB.CommandButton cmdText 
  86.       BackColor       =   &H0080FFFF&
  87.       Caption         =   "Introduceti textul"
  88.       BeginProperty Font 
  89.          Name            =   "Arial"
  90.          Size            =   9
  91.          Charset         =   0
  92.          Weight          =   700
  93.          Underline       =   0   'False
  94.          Italic          =   -1  'True
  95.          Strikethrough   =   0   'False
  96.       EndProperty
  97.       Height          =   615
  98.       Left            =   3000
  99.       MaskColor       =   &H000000FF&
  100.       TabIndex        =   2
  101.       Top             =   2160
  102.       Width           =   1335
  103.    End
  104.    Begin VB.CommandButton cmdStop 
  105.       BackColor       =   &H0080FFFF&
  106.       Caption         =   "STOP"
  107.       BeginProperty Font 
  108.          Name            =   "Arial"
  109.          Size            =   9
  110.          Charset         =   0
  111.          Weight          =   700
  112.          Underline       =   0   'False
  113.          Italic          =   -1  'True
  114.          Strikethrough   =   0   'False
  115.       EndProperty
  116.       Height          =   615
  117.       Left            =   3000
  118.       MaskColor       =   &H000000FF&
  119.       TabIndex        =   1
  120.       Top             =   1320
  121.       Width           =   1335
  122.    End
  123.    Begin VB.CommandButton cmdStart 
  124.       BackColor       =   &H0080FFFF&
  125.       Caption         =   "START"
  126.       BeginProperty Font 
  127.          Name            =   "Arial"
  128.          Size            =   9
  129.          Charset         =   0
  130.          Weight          =   700
  131.          Underline       =   0   'False
  132.          Italic          =   -1  'True
  133.          Strikethrough   =   0   'False
  134.       EndProperty
  135.       Height          =   495
  136.       Left            =   3000
  137.       MaskColor       =   &H000000FF&
  138.       TabIndex        =   0
  139.       Top             =   480
  140.       Width           =   1335
  141.    End
  142.    Begin AgentObjectsCtl.Agent Agent1 
  143.       Left            =   120
  144.       Top             =   0
  145.       _cx             =   847
  146.       _cy             =   847
  147.    End
  148. Attribute VB_Name = "Form1"
  149. Attribute VB_GlobalNameSpace = False
  150. Attribute VB_Creatable = False
  151. Attribute VB_PredeclaredId = True
  152. Attribute VB_Exposed = False
  153. Option Explicit
  154. Dim agent As IAgentCtlCharacter
  155. Dim txt As String
  156. Const GENIEPATH = "C:\WINDOWS\MSAGENT\CHARS\Genie.acs"
  157. Const PEEDYPATH = "C:\WINDOWS\MSAGENT\CHARS\Peedy.acs"
  158. Const MERLINPATH = "C:\WINDOWS\MSAGENT\CHARS\Merlin.acs"
  159. Private Sub Form_Deactivate()
  160. Set agent = Nothing
  161. End Sub
  162. Private Sub cmdStart_Click()
  163. agent.Show
  164. agent.MoveTo 200, 200
  165. agent.Speak txt
  166. End Sub
  167. Private Sub cmdStop_Click()
  168. agent.MoveTo 500, 500
  169. agent.Hide
  170. End Sub
  171. Private Sub cmdText_Click()
  172. txt = InputBox("Introduceti textul:")
  173. If Len(txt) <> 0 Then
  174. agent.Speak txt
  175. End If
  176. End Sub
  177. Private Sub Form_Load()
  178. Set agent = Nothing
  179. Agent1.Characters.Load "Genie", GENIEPATH
  180. optGeniu.Enabled = True
  181. Set agent = Agent1.Characters("Genie")
  182. txt = "Hello Boss!!! My name is Genie."
  183. End Sub
  184. Private Sub optGeniu_Click()
  185. agent.Hide
  186. Agent1.Characters.Unload agent.Name
  187. Set agent = Nothing
  188. optGeniu = True
  189. Agent1.Characters.Load "Genie", GENIEPATH
  190. Set agent = Agent1.Characters("Genie")
  191. txt = "Hello Boss!!! My name is Genie."
  192. End Sub
  193. Private Sub optPapagal_Click()
  194. agent.Hide
  195. Agent1.Characters.Unload agent.Name
  196. Set agent = Nothing
  197. optPapagal = True
  198. Agent1.Characters.Load "Peedy", PEEDYPATH
  199. Set agent = Agent1.Characters("Peedy")
  200. txt = "Hello Boss!!! My name is Peedy."
  201. End Sub
  202. Private Sub optVrajitor_Click()
  203. agent.Hide
  204. Agent1.Characters.Unload agent.Name
  205. Set agent = Nothing
  206. optVrajitor = True
  207. Agent1.Characters.Load "Merlin", MERLINPATH
  208. Set agent = Agent1.Characters("Merlin")
  209. txt = "Hello Boss!!! My name is Merlin."
  210. End Sub
  211.